//
//  main.m
//  oc_26
//
//  Created by 楼楚 on 15/9/17.
//  Copyright (c) 2015年 Chu Lou. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "HumanA.h"
#import "HumanB.h"
int main(int argc, const char * argv[]) {
    @autoreleasepool {
      
//    block 取代代理 做一个回调；
        HumanA *hA = [[HumanA alloc]init];
        hA.degree = @"bachelor ";
        __block HumanA *temHa = hA;
        
        hA.dCB = ^(NSString *str)
        {
            temHa.degree = str;
        };
        HumanB *hB = [[HumanB alloc]init];
        hB.ha = hA;
        NSLog(@"%@",hA.degree);
        [hB giveDegree:@"Master"];
         NSLog(@"%@",hA.degree);
        
    
    
    }
    return 0;
}
